package org.middleware.service.system;

import org.middleware.dao.system.SysPermissionDao;
import org.middleware.entity.system.SysPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author zhiqiangwu
* @description 针对表【sys_permissions(权限表)】的数据库操作Service
* @createDate 2025-09-05 16:40:01
*/
@Service
public class SysPermissionsService {
    @Autowired
    private SysPermissionDao permissionDao;

    public int insert(SysPermissions permission) {
        return permissionDao.queryInsert(permission);
    }

    public List<SysPermissions> searchPermissionsBySystem(int systemId) {
        return permissionDao.searchPermissionsBySystem(systemId);
    }

    public int update(SysPermissions permission) {
        return permissionDao.update(permission);
    }

    public int delete(int id) {
        return permissionDao.delete(id);
    }

}
